<?php

use src\controller\LoginController;

//require __DIR__ . '/src/controller/login/LoginController.php';
spl_autoload_register(function ($class_name) {
    $file_paths = [
        __DIR__ . '/' . str_ireplace('\\', '/', $class_name) . '.php',
    ];
    foreach ($file_paths as $file) {
        if (file_exists($file)) {
            require_once $file;
        }
    }
});


// 调用控制器方法
try {
    $controller = new LoginController();
    $controller->login();
} catch (Exception $e) {
    die("Error: " . $e->getMessage());
}
?>